-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Match FPM status pool's expose_php with parent #9514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I'm not confident that this is the best way to achieve this, or if the created zvals should be freed at some point - would greatly appreciate someone who knows what they're doing reviewing the change, and perhaps offering advice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be also good to add a separate test for this. It should be pretty much just adding that value in a new test which would be sort of a copy of the status listen test. It will require explicit check of that X-Powered-By header. We could also think about providing separate php.ini to executed fpm binary but that might not be required for this PR.
Have added a test, too - more complicated than hoped as there are four different possible instances of expose_php being set:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation looks good - just some comments on tests...
There are also some conflicts looks like so you might need to rebase this. I recommend to first squash it to a single commit and then rebase. |
If an installed php.ini turns expose_php on/off, and an FPM pool overrides that with php_flag[expose_php]=off/on, a status pool created with pm.status_listen in a pool config will have its expose_php reflect the php.ini value, and not the pool config's override. This change looks for an override set in php_flag/php_value/php_admin_flag/php_admin_value and carries that through.
Thanks @bukka - have now done that. |
Merged via e4a1b80 |
If an installed php.ini turns expose_php on/off, and an FPM pool overrides that with php_flag[expose_php]=off/on, a status pool created with pm.status_listen in a pool config will have its expose_php reflect the php.ini value, and not the pool config's override.
This change looks for an override set in
php_flag/php_value/php_admin_flag/php_admin_value and carries that through.
Notably, when coupled with #9508, this fixes sapi/fpm/tests/status-listen.phpt which currently fails if a php.ini is installed with
expose_php=off
.